package com.lill.org.service.impl;

import java.util.List;
import java.util.Map;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.lill.common.component.util.IdUtil;
import com.lill.org.dao.IDepartmentDictDao;
import com.lill.org.model.DepartmentDictModel;
import com.lill.org.service.IDepartmentDictService;

/**
 * 部门字典管理Service实现类
 *
 * @author lill
 * @date 2019-04-24 15:25:16
 */
@Service("com.lill.org.service.impl.DepartmentDictServiceImpl")
public class DepartmentDictServiceImpl implements IDepartmentDictService {
    @Autowired
    private IDepartmentDictDao departmentDictDao;

    public DepartmentDictModel queryObject(String id) {
        return departmentDictDao.queryObject(id);
    }

    public List<DepartmentDictModel> queryList(Map<String, Object> map) {
        return departmentDictDao.queryList(map);
    }

    public int queryTotal(Map<String, Object> map) {
        return departmentDictDao.queryTotal(map);
    }

    public int save(DepartmentDictModel orgDepartmentDict) {
        orgDepartmentDict.setId(IdUtil.createIdbyUUID());
        return departmentDictDao.save(orgDepartmentDict);
    }

    public int update(DepartmentDictModel orgDepartmentDict) {
        return departmentDictDao.update(orgDepartmentDict);
    }

    public int delete(String id) {
        return departmentDictDao.delete(id);
    }

    public int deleteBatch(String[] ids) {
        return departmentDictDao.deleteBatch(ids);
    }
    
	public int deleteLogicByMap(Map<String, Object> map) {
		return departmentDictDao.deleteLogicByMap(map);
	}
}
